package com.SDU.policedispatch.mapper;

import com.SDU.policedispatch.entity.ScheduleHistory;
import com.SDU.policedispatch.entity.Schedules;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ScheduleHistoryMapper extends BaseMapper<ScheduleHistory> {
    @Select("select * from schedule_history where department_name = #{name} and schedule_date = #{date}")
    List<ScheduleHistory> getDataByDate(@Param("date") LocalDate date,
                                  @Param("name") String name);
}
